Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apprt/gtk: handle input methods that end preedit before commit #5550

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

mitchellh
Copy link
Contributor

Fixes #5494

When ibus/fcitx is not running (the GTK "simple" input method is active), the preedit end event triggers before the commit event. For both ibus/fcitx, the opposite is true. We were relying on this ordering.

This commit changes the GTK input handling to not rely on this ordering. Instead, we encode our composing state into the boolean state of whether a key event is pressed. This happens before ANY input method events are triggered.

Tested dead key handling on: X11/Wayland, ibus/fcitx/none.

@mitchellh
Copy link
Contributor Author

This is a draft, I still need to verify ibus 1.5.31 and run through some other input methods.

@mitchellh mitchellh force-pushed the push-yoonmzpqxmpx branch 2 times, most recently from a369d84 to 57a9703 Compare February 3, 2025 17:12
@mitchellh mitchellh marked this pull request as ready for review February 3, 2025 17:12
@mitchellh mitchellh enabled auto-merge February 3, 2025 17:23
@mitchellh mitchellh disabled auto-merge February 3, 2025 17:23
Fixes #5494

When ibus/fcitx is not running (the GTK "simple" input method is
active), the preedit end event triggers _before_ the commit event. For
both ibus/fcitx, the opposite is true. We were relying on this ordering.

This commit changes the GTK input handling to not rely on this ordering.
Instead, we encode our composing state into the boolean state of whether
a key event is pressed. This happens before ANY input method events are
triggered.

Tested dead key handling on: X11/Wayland, ibus/fcitx/none.
@mitchellh
Copy link
Contributor Author

Verified CJK, Emoji, Hex still work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GTK regression: ibus 1.5.31 dead keys on Wayland broken
1 participant